package com.dengcj.epl.entity.ecology;

import cn.hutool.setting.Setting;

/**
 * @author dengchunjie
 * @Description: Ecology相关配置
 * @date 2022/1/19 17:01
 */
public class Ecology {

    // Ecology访问路径
    private static String host;

    // Ecology接口Appid
    private static String apiAppid;

    // Ecology接口Spk
    private static String apiSpk;

    // Ecology接口Secret
    private static String apiSecret;

    public static String getHost() {
        return host;
    }

    public static String getApiAppid() {
        return apiAppid;
    }

    public static String getApiSpk() {
        return apiSpk;
    }

    public static String getApiSecret() {
        return apiSecret;
    }

    public static void init(){
        // 从配置文件读取
        Setting setting = new Setting("ecology.setting");
        host = setting.get("EcologyHost");
        apiAppid = setting.get("ApiAppid");
        apiSpk = setting.get("ApiSpk");
        apiSecret = setting.get("ApiSecret");
    }
}
